<template>
    <div class="container">
        <Breadcrumb :items="['系统管理', '批示清单']" />
        <a-card class="general-card" style="padding-top:20px">
            <a-row>
                <a-col :flex="1">
                    <a-form :model="formModel" label-align="right">
                        <a-row :gutter="16">
                            <a-space direction="horizontal" :size="12">
                                <a-form-item field="userName" label-col-flex="80px" label="被批示人">
                                    <a-input v-model="formModel.userName.value" style="width: 240px;" placeholder="请输入用户姓名" />
                                </a-form-item>
                                <a-form-item field="phone" label-col-flex="80px" label="批示时间">
                                    <a-date-picker  v-model="formModel.day.value" style="width: 240px;" placeholder="请选择批示时间" />
                                </a-form-item>
                                <a-form-item label-col-flex="0px" label="">
                                    <a-space direction="horizontal" :size="12">
                                        <a-button status="success">
                                            <template #icon>
                                                <icon-search />
                                            </template>
                                            查询
                                        </a-button>
                                        <a-button type="primary" status="warning">
                                            <template #icon>
                                                <icon-plus />
                                            </template>
                                            新建
                                        </a-button>
                                    </a-space>
                                </a-form-item>
                            </a-space>
                        </a-row>
                    </a-form>
                </a-col>
            </a-row>
            <a-table :data="renderData" :pagination="true" :bordered="false">
                <template #columns>
                    <a-table-column title="序号" align="left" data-index="id">
                    </a-table-column>
                    <a-table-column title="批示人" align="left" data-index="approver">
                    </a-table-column>
                    <a-table-column title="接收人" align="left" data-index="approvedPerson">
                    </a-table-column>
                    <a-table-column title="批示时间" align="left" data-index="createdTime">
                    </a-table-column>
                    <a-table-column title="批示页面" align="center" data-index="pageName">
                    </a-table-column>
                    <a-table-column title="是否签收" align="center" data-index="isViewed">
                    </a-table-column>
                    <a-table-column title="操作" align="center" :width="100" fixed="right">
                        
                    </a-table-column>
                </template>
            </a-table>

        </a-card>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue';
import { Modal, Message } from '@arco-design/web-vue';
import { postRequest, uploadFileRequest } from '@/api/common';
import { baseURL } from '@/api/base';
const formModel = {
    userName: ref(''),
    phone: ref(''),
    day: ref(''),
    pageNum:1
};
const totalSize = ref(0);
const editVisible = ref(false);
const editDataForm = {
    realName: ref(''),
    phone: ref(''),
    department: ref(''),
    userRole: ref(''),
}

function editItem(record: any) {
    editVisible.value = true;
    editDataForm.realName.value = record.realName;
    editDataForm.phone.value = record.phone;
    editDataForm.department.value = record.department;
    editDataForm.userRole.value = record.userRole;
}
const editSubmit = async() => {
        Message.success('暂无权限修改');
};

let renderData = ref<any[]>([]);
const fetchData = async () => {
  let res = await postRequest("dsms/hg/instructionListQuery", {
    sendPhone:formModel.userName.value,
    pageNum: formModel.pageNum,
    pageSize:99
  });
  console.log(res);
  renderData.value = res.list;
  totalSize.value = Number(res.total);
}
function jumpPage(val: any) {
  formModel.pageNum = val;
  fetchData();
}
fetchData();
</script>
<script lang="ts">
export default {
    name: 'userList',
};
</script>
  
<style scoped lang="less">
.container {
    padding: 0 20px 20px 20px;
}
</style>
  